home *** CD-ROM | disk | FTP | other *** search
- Path: gaia.ns.utk.edu!mbk
- From: mbk@caffeine.engr.utk.edu (Matt Kennel)
- Newsgroups: comp.object,comp.lang.c++
- Subject: Re: The Good, the Bad, the Ugly, and the Wicked ...
- Followup-To: comp.object,comp.lang.c++
- Date: 15 Apr 1996 18:34:06 GMT
- Organization: University of Tennessee, Knoxville and Oak Ridge National Laboratory
- Message-ID: <4ku4qu$f21@gaia.ns.utk.edu>
- References: <31570B8E.5A12@vmark.com> <4je5rq$7qg@mimas.brunel.ac.uk> <4jes0t$gth@decaxp.HARVARD.EDU> <31630E30.5A02@oma.com> <4kbq3q$1i8@gaia.ns.utk.edu> <JSA.96Apr9131057@organon.com> <RMARTIN.96Apr10133335@rcm.oma.com> <JSA.96Apr11153135@organon.com> <milodDprBA9.FyH@netcom.com>
- Reply-To: kennel@msr.epm.ornl.gov
- NNTP-Posting-Host: caffeine.engr.utk.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- John DiCamillo (milod@netcom.com) wrote:
- : jsa@organon.com (Jon S Anthony) writes:
- : >In article <RMARTIN.96Apr10133335@rcm.oma.com> rmartin@oma.com (Robert C. Martin) writes:
-
- : >> Robert C. Martin (rmartin@oma.com) wrote:
- : >>
- : >> > : Malloc and new can *always* be made to be deterministic.
-
- : [Jon and Matt disagree]
-
- : >> You missed my point. new/delete can *always be made* to be completely
- : >> deterministic. Consider:
- : >>
- : >> [example...]
-
- : >1. Yes, we (Matt and I) both missed your point (assuming it was the
- : > one you are now claiming) - probably because this is not what you
- : > said.
-
- : Huh? What Robert wrote was perfectly clear both times. For reasons
- : unknown (time pressure? the desire to argue on the net?) both you and
- : Matt mis-interpreted Robert's post as if it had read
- : 'any old malloc can be *used* in a deterministic manner'
- : instead of
- : 'it is possible to *make* a deterministic malloc'
-
- I assumed that what was meant by "malloc" was the standard library
- function which does general automatic heap allocation using the
- conventional algorithms. (why else call it malloc?) I was using "malloc"
- as a brand name. :-)
-
- The point is that I think this "malloc" should be termed some sort of
- "automatic memory management" like garbage collection.
-
- Robert Martin suggested that one could write one's own deterministic
- special cased memory allocation for limited circumstances.
-
- He called this function 'malloc' but I wouldn't since it doesn't do the
- same thing as real malloc. I'd call that function "get a memory block of
- foobar-size from my preallocated special array of foobar-sized blocks".
-
- I'd call this 'manual memory management'.
-
- I agree to this:
-
- Some circumstances require manual deterministic memory management.
-
- I object to this:
-
- Standard malloc() and free() is manual deterministic memory managment.
-
-
- The point being is that if you reject GC for real-time reasons, it is
- inconsistent to suggest that malloc() and free() are fundamentally
- any better.
-